﻿using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace LocalDbControler
{
    public static class Controller
    {
        static Controller()
        {
            if (!Directory.Exists(dir_App))
            {
                Directory.CreateDirectory(dir_App);
            }

            if (!Directory.Exists(dir_AppConfig))
            {
                Directory.CreateDirectory(dir_AppConfig);
            }

            if (!Directory.Exists(dir_Log))
            {
                Directory.CreateDirectory(dir_Log);
            }
        }

        public static readonly string dir_App = "App";
        public static readonly string dir_AppConfig = @"App\AppConfig";
        public static readonly string dir_Log = @"App\Log";

        public static readonly string file_AppConfig = @"App\AppConfig\App.Config";

        /// <summary>
        /// 配置文件
        /// </summary>
        public static AppConfig AppConfig
        {
            get { return new AppConfig(file_AppConfig); }
        }

        
    }
}
